<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

class HT_Model_administrator_models_object extends Zend_Db_Table {//ten class fai viet hoa

   protected $_db;

    public function __construct() {
        $this->_name = "objects";
        $this->_db = Zend_Registry::get('dbMain');
        parent::init();
    }
    public function getAll($where){
        $sql = "select * from objects where ".$where;
        $retval = $this->_db->fetchAll($sql);
        return $retval;
    }
    public function findById($id){
        $sql = "select * from objects where id = $id";
        $retval = $this->_db->fetchRow($sql);
        return $retval;
    }
 
    
}

?>
